<div id="module_title" >
    <span>Danh sách phần mềm</span>
</div>
<?php include_once 'views/chuongtrinh/message_show.php';  ?>
<div id="system-message-container">
    <?php

        if(empty($success)  === false ){
            echo $success[0];
        }

        if(empty($errors)  === false ){
            echo $errors[0];
        }
    ?>
</div>

<table class="adminlist">
    <thead>
        <tr>
            <th width="2%" >#</th>
            <th class="left" >
                Tên Phần Mềm
            </th>
            <th class="left">
                Mô Tả
            </th>
            <th  colspan="2">Chức năng</th>
        </tr>
    </thead>
    <tbody>
    <?php if ( isset( $software ) && !empty( $software ) ): ?>
        <?php
        $stt = 0;
        foreach ($software as $soft):
            if($stt % 2 == 0){
                $class='row0';
            } else {
                $class='row1';
            }
        ?>
            <tr class="<?php echo $class; ?>" >
                <td><?php echo $stt + 1; ?></td>
                <td><?php echo $soft['software_name']; ?></td>
                <td><?php echo $soft['software_desc']; ?></td>
                <td class="center"  ><a href="index.php?mod=software&act=edit&id=<?php echo $soft['software_id']; ?>">Sửa</a></td>
                <td class="center" ><a onclick="if(!confirm(\'Bạn có chắc muốn xoá!\')) return false;" href="index.php?mod=software&act=del&id=<?php echo $soft['software_id']; ?>">Xoá</a></td>
            </tr>
        <?php endforeach; ?>
    <?php else: ?>
        <tr><td colspan="5" >Không có dữ liệu.</td></tr>
    <?php endif ?>
    </tbody>
    <tfoot>

    </tfoot>
</table>